Imports AppliedRecognition.Speech.QuickSwitch.serialization


Friend Class MenuMap
    Implements IDisposable


    Public Class MenuMapItem
        Public Sub New()
        End Sub
        Public Sub New(ByVal IVMenu As DNSTools.IVMenuAuto, ByVal def As SpeechMenuItem)
            Me.IVMenu = IVMenu
            Me.Def = def
        End Sub
        Private _iVMenu As DNSTools.IVMenuAuto
        Public Property IVMenu() As DNSTools.IVMenuAuto
            Get
                Return _iVMenu
            End Get
            Set(ByVal Value As DNSTools.IVMenuAuto)
                _iVMenu = Value
            End Set
        End Property
        Private _def As SpeechMenuItem
        Public Property Def() As SpeechMenuItem
            Get
                Return _def
            End Get
            Set(ByVal Value As SpeechMenuItem)
                _def = Value
            End Set
        End Property

        Public Overrides Function ToString() As String
            Return Def.Name.ToString
        End Function
    End Class


    Private _globalMenu As MenuMapItem
    Public Property GlobalMenu() As MenuMapItem
        Get
            Return _globalMenu
        End Get
        Set(ByVal Value As MenuMapItem)
            _globalMenu = Value
        End Set
    End Property
    Private _taskMenu As MenuMapItem
    Public Property TaskMenu() As MenuMapItem
        Get
            Return _taskMenu
        End Get
        Set(ByVal Value As MenuMapItem)
            _taskMenu = Value
        End Set
    End Property
    private _testingMenu as MenuMapItem
    Public Property TestingMenu As MenuMapItem
        Get
            Return _testingMenu
        End Get
        Set(Byval Value As MenuMapItem)
            _testingMenu = Value
        End Set
    End Property
    private _resizeWindowMenu as MenuMapItem
    Public Property ResizeWindowMenu As MenuMapItem
        Get
            Return _resizeWindowMenu
        End Get
        Set(Byval Value As MenuMapItem)
            _resizeWindowMenu = Value
        End Set
    End Property
    private _windowMoveMenu as MenuMapItem
    Public Property WindowMoveMenu As MenuMapItem
        Get
            Return _windowMoveMenu
        End Get
        Set(Byval Value As MenuMapItem)
            _windowMoveMenu = Value
        End Set
    End Property
    private _mouseMenu as MenuMapItem
    Public Property MouseMenu As MenuMapItem
        Get
            Return _mouseMenu
        End Get
        Set(Byval Value As MenuMapItem)
            _mouseMenu = Value
        End Set
    End Property

    Private _activeSubMenu As MenuMapItem
    Public Property ActiveSubMenu() As MenuMapItem
        Get
            Return _activeSubMenu
        End Get
        Set(ByVal Value As MenuMapItem)
            _activeSubMenu = Value
        End Set
    End Property

    Public ReadOnly Property ActiveMenuName() As MenuName
        Get
            If ActiveSubMenu Is Nothing Then
                Return GlobalMenu.Def.Name
            End If
            Return ActiveSubMenu.Def.Name
        End Get
    End Property


    Public Sub Dispose() Implements System.IDisposable.Dispose
        Me.GlobalMenu = Nothing
        Me.ActiveSubMenu = Nothing
        Me.TaskMenu = Nothing
        GC.SuppressFinalize(Me)
    End Sub
End Class
